let arr = [1,2,3,4,5]

arr.splice(-6,2,6)
console.log(arr);

Array.prototype.mysplice = function(start, num, value) {
    if(start < 0) {
        start = this.length + start
    }
    for(let i = start; i < start+num; i++) {
        delete this[i]
    }
    this.length = this.length - num
}
arr.mysplice(1,2)
console.log(arr);